<template>
  <div class="study">
    <div class="header">
      <div class="uheader">
        <div class="MyImg"><img :src="list.toux | dalImg" alt="" /></div>
        <div class="message">
          <h3 class="user">{{ this.list.ziliao.name }}</h3>
          <p class="UserMessage">{{ this.list.desc }}</p>
        </div>
      </div>
      <div class="nav">
        <div class="order">我的订购</div>
        <div class="collect" @click="live">我的收藏</div>
        <div class="download">我的下载</div>
      </div>
    </div>
    <div class="main">
      <div class="header">
        <div class="left">
          <h3>在学的课程</h3>
        </div>
        <div class="right">
          <a href="">查看全部></a>
        </div>
      </div>
      <div class="main_bottom">
        <div class="main_course" v-for="item in 10" :key="item">
          <div class="lfet">
            <div class="title">3天入门水彩插画【涂鸦王国】</div>
            <div class="sstudy">已学 %</div>
          </div>
          <div class="right">
            <img src="../assets/image/lc.jpg" alt="" />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  methods: {
    live() {
      this.$router.push({ name: "Live" });
    },
  },
  created() {
    this.$store.commit("tabShow");
    this.list = JSON.parse(localStorage.getItem("account"));
  },
};
</script>

<style lang="scss">
.study {
  height: 100%;
  width: 100%;
  color: #505050;
  background-color: #f2f4f8;
  display: flex;
  flex-direction: column;
  > .header {
    background-color: #fff;
    overflow: hidden;
  }
  .uheader {
    box-sizing: border-box;
    margin: 20px;
    display: flex;

    .MyImg {
      margin-right: 10px;
      width: 70px;
      height: 70px;
      background-color: red;
      border-radius: 50%;
    }
    .user {
      background-color: #fff;
    }
    .message {
      margin: 10px;
      flex: 1;
      display: flex;
      flex-direction: column;
      .UserMessage {
        margin: 5px 0;
        flex: 1;
        font-size: 13px;
      }
    }
  }
  .nav {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    > div {
      text-align: center;
      flex: 1;
      border-right: 1px solid #eceef1;
    }
    .download {
      border: 0;
      font-size: 14px;
    }
  }
  .main {
    flex: 1;
    background-color: #fff;
    margin-top: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    > .header {
      margin: 20px 10px;
      display: flex;
      justify-content: space-between;
      > .left {
        font-size: 15px;
      }
      > .right {
        > a {
          font-size: 14px;
          color: #a6a6a6;
        }
      }
    }
    .main_bottom {
      flex: 1;
      overflow: auto;
      .main_course {
        height: 100px;
        border-top: 2px solid #eceef1;
        padding: 10px;
        display: flex;
        .lfet {
          flex: 1;
          margin-right: 90px;
          display: flex;
          flex-direction: column;
          .title {
            font-size: 15px;
            flex: 1;
          }
          > .sstudy {
            font-size: 14px;
            color: #33b17b;
          }
        }
        .right {
          img {
            height: 100%;
          }
        }
      }

      .main_course:nth-child(1) {
        border: 0;
      }
    }
  }
}
</style>